package cn.stylefeng.guns.modular.gridsystem.entity;

import cn.stylefeng.guns.core.pojo.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;

/**
 * 故障明细表
 *
 * @author ssy
 * @date 2021/09/14 11:47
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("biz_exception_log")
public class BizExceptionLog extends BaseEntity {

    /**
     * id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 关联哪个故障
     */
    @TableField("exception_id")
    private Integer exceptionId;

    /**
     * 初次创建时间
     */
    @TableField("created_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    /**
     * 文件名
     */
    @TableField("file_name")
    private String fileName;

    /**
     * 上报网关的通道
     */
    @TableField("gateway_channel")
    private String gatewayChannel;

    /**
     * 上报网关的编号
     */
    @TableField("gateway_code")
    private String gatewayCode;

    @TableField("create_time")
    private Date createTime;

    /**
     * 故障时间（1:1）
     */
    @TableField("exception_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date exceptionTime;

    /**
     * 故障编号
     */
    @TableField("access_token")
    private String accessToken;

    @TableField("voice_score")
    private String voiceScore;
}
